/**
 * 一般对话框
 */
var NormalDialog = Dialog.extend({
    /**
     * 确定回调
     * @type {Function}
     * @private
     */
    _confirmCb: null,
    /**
     * 取消回调
     * @type {Function}
     * @private
     */
    _cancelCb: null,
    /**
     * 文本
     * @type {String}
     * @private
     */
    _content: null,

    _ccsFileName: res.MessageBox_json,

    initDialog: function (content, confirmCb, cancelCb) {
        this._confirmCb = confirmCb;
        this._cancelCb = cancelCb;
        this._content = content;
        this._initBtns();
        this._initContent();
    },
    /**
     * 初始化文本
     * @private
     */
    _initContent: function () {
        this._nodeList['text'].setString(this._content);
    },
    /**
     * 初始化按钮
     * @protected
     */
    _initBtns: function () {
        this._nodeList['btn_confirm'].setVisible(true);
        this._nodeList['btn_cancel'].setVisible(true);
        this._nodeList['btn_ok'].setVisible(false);
    },
    _initClickListeners: function () {
        this._super();
        this._clickListeners = {
            'btn_confirm': '_clickConfirm',
            'btn_cancel': '_clickCancel',
            'btn_ok': '_clickOK'
        };
    },
    /**
     * 点击确定
     * @private
     */
    _clickConfirm: function () {
        if (_.isFunction(this._confirmCb)) {
            this._confirmCb();
        }
        this.close();
    },
    /**
     * 点击确定
     * @private
     */
    _clickCancel: function () {
        if (_.isFunction(this._cancelCb)) {
            this._cancelCb();
        }
        this.close();
    },
    /**
     * 点击肯定
     * @private
     */
    _clickOK: function () {
        if (_.isFunction(this._confirmCb)) {
            this._confirmCb();
        }
        this.close();
    },
});